// 头部
import 'package:flutter/material.dart';
import '../style.dart';
import '../utils/extension/double.dart';

class TopBody extends StatelessWidget {
  final Widget content;
  final double height;

  const TopBody({Key? key, required this.content, required this.height})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(left: 10.px, bottom: 20.px),
      child: content,
      // color: themeColor, 会和decoration冲突
      height: height,
      width: double.infinity,
      decoration: BoxDecoration(
        color: themeColor,
        borderRadius: BorderRadius.only(
            bottomLeft: Radius.circular(10.px),
            bottomRight: Radius.circular(10.px)),
      ),
    );
  }
}